package org.weather.data.collect;

import org.aspectj.weaver.ast.Test;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

/**
 * Hello world!
 *
 */
public class App 
{

    public void test(){

        System.out.println("开始");
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {

                Date date = new Date(this.scheduledExecutionTime());
                System.out.println("执行时间段:"+date);
            }
        },1000,2000);
    }

    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        App app = new App();
        app.test();

    }
}
